package com.threeti.jiayusms.framework.dao;

import java.util.List;

import com.threeti.jiayusms.framework.domain.DomainEntity;

public interface GenericDao<T extends DomainEntity> {
  T loadBy(Long id);
  T loadBy(Long id, boolean isLoadFromCache);
  
  List<T> findAll();

  T store(T domainEntity) throws EntityAlreadyExistException, EntitySaveOrUpdateException;

  void removeBy(Long id);
  void remove(T domainEntity);

  void forceInitialize(Object poOrCollectionProxy);
}
